package com.project.yuepai.service.Impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.project.yuepai.dao.OrderMapper;
import com.project.yuepai.dto.OrderDto;
import com.project.yuepai.service.OrderService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class OrderServiceImpl implements OrderService{

    @Resource
    private OrderMapper orderMapper;

    @Override
    public PageInfo<OrderDto> findAgreeOrders(Integer page,Integer limit,Integer activeUserRole,String activeNickName,String activePhone,Integer invitedUserRole,String invitedNickName,String invitedPhone) {
        PageHelper.startPage(page,limit);
        return new PageInfo<OrderDto>(orderMapper.findAgreeOrders(activeUserRole,activeNickName,activePhone,invitedUserRole,invitedNickName,invitedPhone));
    }
}
